//
//  AKPickerViewController.m
//  myDemo2
//
//  Created by wuxueying on 14-4-16.
//
//

#import "AKPickerViewController.h"

@interface AKPickerViewController ()<AKPickerViewDelegate>
@property (nonatomic, strong) AKPickerView *pickerView;
@property (nonatomic, strong) NSArray *titles;
@end
@implementation AKPickerViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    self.pickerView = [[AKPickerView alloc] initWithFrame:CGRectMake(0, 100, 320, 30)];
	self.pickerView.delegate = self;
	[self.view addSubview:self.pickerView];
    
	self.titles = @[@"伍雪颖",
					@"马神",
					@"陈磊",
					@"刘波波",
					@"黑人",
					@"华哥",
					@"鸡哥",
					@"东哥"];
    
	self.pickerView.font = [UIFont fontWithName:@"HelveticaNeue-Light" size:20];
	self.pickerView.textColor = [UIColor grayColor];
	self.pickerView.highlightedTextColor = [UIColor blackColor];
	[self.pickerView reloadData];
}

- (NSUInteger)numberOfItemsInPickerView:(AKPickerView *)pickerView
{
	return [self.titles count];
}

- (NSString *)pickerView:(AKPickerView *)pickerView titleForItem:(NSInteger)item
{
	return self.titles[item];
}

- (void)pickerView:(AKPickerView *)pickerView didSelectItem:(NSInteger)item
{
	NSLog(@"%@", self.titles[item]);
}

@end
